Hello,
/**********************************
addItemToList
***********************************/
void addItemToList (Item I)
{
string ugName = null
ModName_ modRef
LockList lList
Lock lck
int rowNum = 0
int count = 0
Item I2
bool itemExists = false
//Check the item isn't all ready in the list.
for I2 in items do
{
if (name (I) == (string key (items)))
{
itemExists = true
}
}
//If not in the list all ready.
if (!itemExists)
{
//Add the formal module.
if (type (I) == "Formal")
{
modRef = module (fullName (I))
//Get the locks on the module if any.
lList = getLocksInModule (modRef, true)
for lck in lList do
{
count++
ugName = lck.user
}
if(count>1){ ugName = ugName "{+}"}
//Insert the module in the list with with normal icon if not locked.
if (!isLocked (modRef) || (isLocked (modRef) && ugName == null))
{
insert (moduleList, rowNum, name (I), iconFormal)
set (moduleList, rowNum, 1, ugName)
put (items, name (I), I)
}
//Insert the item in the list with the deleted icon indicating it is locked
//and will not be processed.
else
{
insert (moduleList, rowNum, name (I), iconUser)
set (moduleList, rowNum, 1, ugName)
}
}
rowNum++
}
delete(lList)
}//End addItemToList.
SystemAdmin - Fri Jun 22 10:55:50 EDT 2012 |
Re: finding locked Modules I also have another question. Do you have to delete a LockList, if not will you get a memeory leak? when I attempt to delete the LockList I get a memory error(log). Thank you, Jim |
Re: finding locked Modules This does not look right.
I believe I would do these:
Failing to delete structures matters as you approach 10,000 such structures. Its' hard to have 10,000 modules but easy to have 10,000 objects. So no there is no problem here; but surely it's good practice to match up a "delete" for each such "create". Good Karma too. Not sure about your overall problem of not seeing some locks, but perhaps the follow applies:
-Louie |